<div class="page">
	<div class="pageContent">
	
	<form method="post" action="__APP__/Car/saveBrandPaike/navTabId/__MODULE__" class="pageForm required-validate" onsubmit="return validateCallback(this, closeDialogAjaxDone)">
		<div class="pageFormContent" layoutH="58">
			<div class="unit">
				<label>品牌名称：</label>
				<input type="text" readonly="readonly" class="text readonly" name="name" value="{$name}"/>
				<input type="hidden" name="id" value="{$id}"/> 
			</div>
 			<div class="unit">
				<label>品牌资料：</label>
				<div style="width:700px;float:left;margin-left:130px;"><script type="text/plain"  id="content" name="content"></script></div>
				<input type="hidden" name="img_path" id="img_path" value=""/>
			</div>
		</div>
		
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">添加</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
	</div>
</div>

<script type="text/javascript">
var editor = new baidu.editor.ui.Editor({  
    toolbars:[['paragraph','customstyle','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify','bold','italic','underline','fontsize','fontfamily','touppercase','tolowercase','forecolor', 'backcolor',
    	'fontborder','strikethrough', 'superscript', 'subscript','insertimage']],  
    autoClearinitialContent:true,  
    maximumWords:3000, 
    initialFrameHeight:250,
});  
editor.render( 'content' );

editor.addListener('beforeInsertImage', function(t, arg){
	//$("#pics").attr("value", arg[0].src);
	var img_path = $("#img_path").val().trim();
	if (img_path == null || img_path == '')
		img_path = arg[0].src;
	else
		img_path += '|'+arg[0].src;
	$("#img_path").val(img_path);
});

</script>